package com.ruoyi.bmxt.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bmxt.mapper.BmProjectMapper;
import com.ruoyi.bmxt.domain.BmProject;
import com.ruoyi.bmxt.service.IBmProjectService;

/**
 * 项目管理Service业务层处理
 * 
 * @author 魏建波
 * @date 2023-02-28
 */
@Service
public class BmProjectServiceImpl implements IBmProjectService 
{
    @Autowired
    private BmProjectMapper bmProjectMapper;

    /**
     * 查询项目管理
     * 
     * @param projectId 项目管理主键
     * @return 项目管理
     */
    @Override
    public BmProject selectBmProjectByProjectId(Long projectId)
    {
        return bmProjectMapper.selectBmProjectByProjectId(projectId);
    }

    /**
     * 查询项目管理列表
     * 
     * @param bmProject 项目管理
     * @return 项目管理
     */
    @Override
    public List<BmProject> selectBmProjectList(BmProject bmProject)
    {
        return bmProjectMapper.selectBmProjectList(bmProject);
    }

    /**
     * 新增项目管理
     * 
     * @param bmProject 项目管理
     * @return 结果
     */
    @Override
    public int insertBmProject(BmProject bmProject)
    {
        bmProject.setCreateTime(DateUtils.getNowDate());
        return bmProjectMapper.insertBmProject(bmProject);
    }

    /**
     * 修改项目管理
     * 
     * @param bmProject 项目管理
     * @return 结果
     */
    @Override
    public int updateBmProject(BmProject bmProject)
    {
        bmProject.setUpdateTime(DateUtils.getNowDate());
        return bmProjectMapper.updateBmProject(bmProject);
    }

    /**
     * 批量删除项目管理
     * 
     * @param projectIds 需要删除的项目管理主键
     * @return 结果
     */
    @Override
    public int deleteBmProjectByProjectIds(Long[] projectIds)
    {
        return bmProjectMapper.deleteBmProjectByProjectIds(projectIds);
    }

    /**
     * 删除项目管理信息
     * 
     * @param projectId 项目管理主键
     * @return 结果
     */
    @Override
    public int deleteBmProjectByProjectId(Long projectId)
    {
        return bmProjectMapper.deleteBmProjectByProjectId(projectId);
    }
}
